home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / ISp Sample / Source / CModalDialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.7 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CModalDialog.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                xxx put dri here xxx
  13.  
  14.         Other Contact:        xxx put other contact here xxx
  15.  
  16.         Technology:            xxx put technology here xxx
  17.  
  18.     Writers:
  19.  
  20.         (BWS)    Brent Schorsch
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <SP1>      7/1/99    BWS        first checked in
  25. */
  26.  
  27. #ifndef __CModalDialog__
  28. #define __CModalDialog__
  29.  
  30. //•    ————————————————————————————————————————    Includes
  31.  
  32. #ifndef __MENUS__
  33. #include <Menus.h>
  34. #endif
  35.  
  36. //•    ————————————————————————————————————————    Public Definitions
  37. //•    ————————————————————————————————————————    Public Types
  38.  
  39. class CModalDialog
  40. {
  41. protected:
  42.  
  43.     DialogPtr    dialog;
  44.     short        numBaseItems;
  45.  
  46. public:
  47.  
  48.     CModalDialog(const short inDialogID);
  49.     ~CModalDialog();
  50.  
  51.     void Show(void);
  52.     void Hide(void);
  53.     void MakeCurrentPort(void);
  54.     void SetDefaultItem(const short inWhichItem);
  55.     void SetCancelItem(const short inWhichItem);
  56.  
  57.     short GetItemValue(const short inWhichCheckBox);
  58.     void GetEditText(const short inWhichItem, Str255 outText);
  59.     void GetStaticText(const short inWhichItem, Str255 outText);
  60.     MenuHandle GetItemMenuHandle(const short inWhichItem);
  61.  
  62.     void GetItemValue(const short inWhichCheckBox, const short inValue);
  63.     void SetEditText(const short inWhichItem, Str255 inText);
  64.     void SetStaticText(const short inWhichItem, Str255 inText);
  65.  
  66.     void SelectEditText(const short inWhichItem, const short inStart, const short inEnd);
  67. };
  68.  
  69. //•    ————————————————————————————————————————    Public Variables
  70. //•    ————————————————————————————————————————    Public Functions
  71.  
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75.  
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79.  
  80. #endif
  81.